package com.java2104.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Controller
public class IndexController {

    @GetMapping({"/order_list", "/order_list.html"})
    public String orderList(){
        return "order_list";
    }

    @GetMapping({"/pay_list", "/pay_list.html"})
    public String payList(){
        return "pay_list";
    }

    @GetMapping({"/product_detail", "/product_detail.html"})
    public String productDetail(){
        return "product_detail";
    }

    @GetMapping({"/product_list", "/product_list.html"})
    public String productList(){
        return "product_list";
    }

    @GetMapping({"/recycle_bin", "/recycle_bin.html"})
    public String recycleBin(){
        return "recycle_bin";
    }

    @GetMapping({"/sales_volume","/sales_volume.html"})
    public String salesVolume(){
        return "sales_volume";
    }

    @GetMapping({"/setting","/setting.html"})
    public String setting(){
        return "setting";
    }

    @GetMapping({"/user_detail/{id}","/user_detail.html"})
    public String userDetail(@PathVariable Integer id, Model model){
        model.addAttribute("id",id);
        return "user_detail";
    }

    @GetMapping({"/user_list","/user_list.html"})
    public String userList(){
        return "user_list";
    }

    @GetMapping({"/user_rank","/user_rank.html"})
    public String userRank(){
        return "user_rank";
    }

    @GetMapping({"/adjust_funding", "/adjust_funding.html"})
    public String adjustFunding(){
        return "adjust_funding";
    }

    @GetMapping({"/discharge_statistic", "/discharge_statistic.html"})
    public String dischargeStatistic(){
        return "discharge_statistic";
    }

    @GetMapping({"/express_list", "/express_list.html"})
    public String expressList(){
        return "express_list";
    }

    @GetMapping({"/index", "/index.html"})
    public String index(){
        return "index";
    }

    @GetMapping({"/order_detail", "/order_detail.html"})
    public String orderDetail(){
        return "order_detail";
    }

    @GetMapping({"/login", "/login.html"})
    public String login(){
        return "login";
    }
}
